package com.ruoyi.common.rabbit.configure;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQConfig {
	@Bean   // 消息转换器，定义在配置文件中
	public MessageConverter jsonMessageConverter() {
		return new Jackson2JsonMessageConverter();
	}
}

